package com.runfast.waimai.utils.rabbitmq;

import org.springframework.amqp.core.FanoutExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by WQ on 2018/6/15.
 */
@Configuration
public class RabbitMQConfig {
    @Bean
    public FanoutExchange exchange() {
        return new FanoutExchange("waimaiServer_order_exchange");
    }

    @Bean
    public FanoutExchange exchange1() {
        return new FanoutExchange("server_shopper_exchange");
    }

    @Bean
    public FanoutExchange exchange2() {
        return new FanoutExchange("paotuiServer_order_exchange");
    }
//    @Bean
//    public FanoutExchange test() {
//        return new FanoutExchange("test");
//    }
//
//    @RabbitListener(bindings = @QueueBinding(value = @Queue, exchange = @Exchange(value = "test", ignoreDeclarationExceptions = "true")))
//    public void processOrder(String str) {
//        System.out.println(str);
//    }
}
